﻿using Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LDM.Sys.ServiceAPI.Model.ViewModel.Request.AuthorityReq
{
    /// <summary>
    /// 获取菜单请求
    /// </summary>
    public class GetSysMenuReq : PageInfo
    {
        /// <summary>
        /// 菜单名称
        /// </summary>
        public string MenuName { get; set; }

        /// <summary>
        /// 菜单编码
        /// </summary>
        public string MenuCode { get; set; }

        /// <summary>
        /// 菜单类型1菜单2页面
        /// </summary>
        public int MenuType { get; set; }

        /// <summary>
        /// 父级菜单
        /// </summary>
        public int PId { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }
    }
    /// <summary>
    /// 添加菜单请求
    /// </summary>
    public class AddSysMenuReq
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Menuname { get; set; }

        /// <summary>
        /// 菜单类型1菜单2页面
        /// </summary>
        public int Menutype { get; set; }

        /// <summary>
        /// 父级菜单
        /// </summary>
        public int Pid { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }
    }
    /// <summary>
    /// 修改菜单请求
    /// </summary>    
    public class UpdateSysMenuReq
    {

        /// <summary>
        /// 主键
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Menuname { get; set; }

        /// <summary>
        /// 菜单类型1菜单2页面
        /// </summary>
        public int Menutype { get; set; }

        /// <summary>
        /// 父级菜单
        /// </summary>
        public int Pid { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }
    }

    /// <summary>
    /// 删除菜单请求
    /// </summary>    
    public class DelSysMenuReq
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int Id { get; set; }

    }


    /// <summary>
    /// 设置角色菜单
    /// </summary>
    public class SetRoleMenuReq 
    {
        /// <summary>
        /// 菜单Id
        /// </summary>
        public int MenuId { get; set; }
        /// <summary>
        /// 角色ID
        /// </summary>
        public List<int> RoleIds { get; set; } = new List<int>();
    }


    /// <summary>
    /// 设置菜单角色
    /// </summary>
    public class SetMenuRoleReq
    {
        /// <summary>
        /// 角色ID
        /// </summary>
        public int RoleId { get; set; }
        /// <summary>
        /// 菜单Ids
        /// </summary>
        public List<int> MenuIds { get; set; } = new List<int>();
    }
}
